<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
            margin: 100px auto;
        }
        p{
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
            margin: 0 auto;
        }
        .demo{
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
            margin: 100px auto;
        }
    </style>
</head>
<body>
    <div id="box"></div>
    <p>hello</p>
    <div class="demo"></div>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function () {
        //jquery获取类(class)选择器
        $(".demo").css("background","yellow");
    })
</script>